﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DotNet.Entity;

namespace DotNet.JCore.Entity
{
    /// <summary>
    /// 同步车辆出站数据
    /// </summary>
    [Table("同步车辆出站数据")]
    public class SyncCarExitStation
    {
        /// <summary>
        /// 主键
        /// </summary>
        [PrimaryKey]
        [Column("主键", false)]
        public string Id { get; set; }

        /// <summary>
        /// 车牌号
        /// </summary>
        [Column("车牌号")]
        public string BusCode { get; set; }

        /// <summary>
        /// 线路
        /// </summary>
        [Column("线路")]
        public string LineName { get; set; }

        /// <summary>
        /// 出站时间
        /// </summary>
        [Column("出站时间")]
        public DateTime? OutTime { get; set; }

        /// <summary>
        /// 运行时间（当前时间-出站时间）
        /// </summary>
        [Column("运行时间")]
        public int RunSecond { get; set; }

        /// <summary>
        /// 售票数
        /// </summary>
        [Column("售票数")]
        public string SaleCount { get; set; }

        /// <summary>
        /// 乘客人数
        /// </summary>
        [Column("乘客人数")]
        public string OutNum { get; set; }

        /// <summary>
        /// 核载人数
        /// </summary>
        [Column("核载人数")]
        public string SeatCount { get; set; }

        /// <summary>
        /// 所属客运站
        /// </summary>
        [Column("所属客运站")]
        public string OwnerStationName { get; set; }

        /// <summary>
        /// 司机姓名
        /// </summary>
        [Column("司机姓名")]
        public string Driver1Name { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        [Column("联系电话")]
        public string Driver1Tel { get; set; }

        /// <summary>
        /// 稽查点名称
        /// </summary>
        [Column("稽查点名称")]
        public string PointName { get; set; }


        /// <summary>
        /// 所属客运站id
        /// </summary>
        [Column("所属客运站id",false)]
        public string OwnerStation { get; set; }


        /// <summary>
        /// 运输企业
        /// </summary>
        [Column("运输企业",false)]
        public string OwnerCompName { get; set; }

        /// <summary>
        /// 运行状态
        /// </summary>
        [Ignore]
        [Column("正常",false)]
        public bool RunStatus { get; set; } = true;

        /// <summary>
        /// 运行状态 0正常 1异常
        /// </summary>
        [Ignore]
        [Column("状态",false)]
        public string RunStatusText
        {
            get { return RunStatus ?  "正常": "异常"; }
        }

        /// <summary>
        /// 同步时间
        /// </summary>
        [Ignore]
        [Column("同步时间",false)]
        public DateTime? Syn_Time { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Ignore]
        [Column("备注",false)]
        public string Note { get; set; }

        /// <summary>
        /// 稽查点id
        /// </summary>
        [Ignore]
        [Column("稽查点id",false)]
        public string PoinID { get; set; }

        /// <summary>
        /// 稽查状态：0-未稽查 1-已稽查
        /// </summary>
        [Column("稽查状态",false)]
        public int CheckStatus { get; set; }

        /// <summary>
        /// 复制对象
        /// </summary>
        public SyncCarExitStation Clone()
        {
            return (SyncCarExitStation)MemberwiseClone();
        }
    }
}
